/PROG  PNS0049
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53393576/77";
PROG_SIZE	= 3378;
CREATE		= DATE 15-06-17  TIME 20:57:08;
MODIFIED	= DATE 25-02-25  TIME 21:59:28;
FILE_NAME	= PNS0021;
VERSION		= 0;
LINE_COUNT	= 119;
MEMORY_SIZE	= 3846;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R45 ;
   6:  !  PROGRAM: PNS0021 ;
   7:  !  PART:53103737/36  ;
   8:  !PQW_2015710********************* ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.2    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  R[5:SPEED/SuDu]=10    ;
  24:  OVERRIDE=R[5:SPEED/SuDu] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  28:  PAUSE ;
  29:  R[1:CYCLE TOTAL]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5:SPEED/SuDu] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  39:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  40:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  41:  R[8:R MOVE TIME]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON,JMP LBL[25] ;
  49:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  WAIT DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON    ;
  54:  R[5:SPEED/SuDu]=100    ;
  55:  TIMER[3]=START ;
  56:  OVERRIDE=R[5:SPEED/SuDu] ;
  57:J P[3:PICK APPROACH] 100% CNT60 ACC120    ;
  58:   ;
  59:   ;
  60:J P[4:PICK] 100% CNT50 TB R[18]sec,CALL PARTPICK ACC100    ;
  61:  PAYLOAD[4] ;
  62:  CALL CHK_PICK    ;
  63:  MONITOR Z_CHECH ;
  64:J P[5:PICK DEPART] 100% CNT70 ACC110 TA R[20]sec,DO[5:TO R34 DROP START]=PULSE,0.5sec    ;
  65:  DO[8:P4 PARTS OUT]=PULSE,0.5sec ;
  66:  LBL[27] ;
  67:  CALL CHECKPICK    ;
  68:  IF DI[9:VACUUM ONL]=OFF OR DI[11:VACUUM ONR]=OFF,JMP LBL[27] ;
  69:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  70:  LBL[30:GOTO DROP POUNCE] ;
  71:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  72:  TIMER[3]=STOP ;
  73:  LBL[40:AT DROP POUNCE] ;
  74:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  75:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P5 DROP ENTRY]=ON,JMP LBL[50] ;
  76:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  77:  JMP LBL[40] ;
  78:   ;
  79:  LBL[50:MOVE DROP SNEAK] ;
  80:  TIMER[3]=START ;
  81:  OVERRIDE=R[5:SPEED/SuDu] ;
  82:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  83:  LBL[51:DROP OR C-P-S] ;
  84:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  85:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  86:  JMP LBL[51] ;
  87:  JMP LBL[50] ;
  88:   ;
  89:  LBL[60:MOVE CLS-PRS-ACC] ;
  90:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  91:  PAUSE ;
  92:  JMP LBL[30] ;
  93:   ;
  94:  LBL[80:DROP ENABLED] ;
  95:  TIMER[3]=START ;
  96:  !PROCEED TO DROP ;
  97:  OVERRIDE=R[5:SPEED/SuDu] ;
  98:J P[10:DROP APPROACH] 100% CNT40 ACC100    ;
  99:  MONITOR END Z_CHECH ;
 100:J P[11:DROP] 100% CNT0 TB R[19]sec,CALL PARTDROP ACC100    ;
 101:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 102:  PAYLOAD[3] ;
 103:  CALL CHK_DROP    ;
 104:   ;
 105:J P[12:DROP DEPART] 100% CNT100 ACC130 TA    .20sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 106:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 107:  !GOTO PICK POUNCE ;
 108:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 109:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 110:  JMP LBL[10] ;
 111:   ;
 112:  LBL[90:END OF CYCLE] ;
 113:  TIMER[1]=STOP ;
 114:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 115:  MONITOR END MON_PICK ;
 116:J P[1:MIDDLE] 50% CNT100    ;
 117:  MOVE TO HOME    ;
 118:   ;
 119:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z =  -762.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2129.913  mm,	Y =  1483.969  mm,	Z = -1134.442  mm,
	W =  -179.956 deg,	P =      .079 deg,	R =   145.740 deg,
	E1=   139.735 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2579.030  mm,	Y =  3132.836  mm,	Z = -1122.384  mm,
	W =   179.158 deg,	P =     -.446 deg,	R =    89.838 deg,
	E1=   195.245 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2579.029  mm,	Y =  3132.835  mm,	Z = -1264.224  mm,
	W =   179.158 deg,	P =     -.446 deg,	R =    89.838 deg,
	E1=   195.245 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2578.799  mm,	Y =  3132.786  mm,	Z =  -970.165  mm,
	W =   179.165 deg,	P =     -.441 deg,	R =    89.839 deg,
	E1=   195.246 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2052.653  mm,	Y =  1509.429  mm,	Z = -1003.019  mm,
	W =   179.822 deg,	P =      .418 deg,	R =   148.341 deg,
	E1=   136.630 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2079.581  mm,	Y =  -888.500  mm,	Z = -1040.560  mm,
	W =  -179.873 deg,	P =     -.186 deg,	R =  -156.728 deg,
	E1=    81.592 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2193.121  mm,	Y = -1650.371  mm,	Z = -1037.239  mm,
	W =  -179.841 deg,	P =     -.259 deg,	R =  -139.454 deg,
	E1=    64.352 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2591.757  mm,	Y = -3283.391  mm,	Z = -1003.236  mm,
	W =  -179.444 deg,	P =     -.552 deg,	R =   -92.271 deg,
	E1=    17.270 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2591.753  mm,	Y = -3283.391  mm,	Z = -1235.237  mm,
	W =  -179.444 deg,	P =     -.552 deg,	R =   -92.271 deg,
	E1=    17.270 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2594.423  mm,	Y = -3285.390  mm,	Z = -1187.051  mm,
	W =  -179.444 deg,	P =     -.552 deg,	R =   -92.271 deg,
	E1=    17.270 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2075.596  mm,	Y = -1416.014  mm,	Z = -1109.521  mm,
	W =  -179.608 deg,	P =      .213 deg,	R =  -148.268 deg,
	E1=    73.487 deg
};
/END
